<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <!-- 
    思路:
    1) 定义下标, 可以根据下标从数组中取值
    2) 用v-bind动态设置img标签的src属性值
    3) 监听按钮点击(上一页 index--, 下一页 index++)
    4) 边界判断 
       上一页按钮展示 index > 0
       下一页按钮展示 index < list.length-1 
   -->
  <div id="app">
    <button v-if="index > 0" @click="index--">上一页</button>
    <div>
      <img :src="list[index]" alt="">
    </div>
    <button v-if="index < list.length-1" @click="index++">下一页</button>
  </div>
  <script src="https://cdn.jsdelivr.net/npm/vue@2/dist/vue.js"></script>
  <script>
    const app = new Vue({
      el: '#app',
      data: {
        // 图片路径数组
        list: [
          './imgs/11-00.gif',
          './imgs/11-01.gif',
          './imgs/11-02.gif',
          './imgs/11-03.gif',
          './imgs/11-04.png',
          './imgs/11-05.png'
        ],
        index: 0
      }
    })
  </script>
</body>

</html>